<div class="row">
	<div class="col-md-12">
		<div class="page-header">
			<a class="pull-right btn btn-info" ng-click="save()"><i class="glyphicon glyphicon-save"></i>保存</a>
			<a class="pull-right btn btn-warning" ng-click="clear()"><i class="glyphicon glyphicon-trash"></i> 清空</a>
			<a class="pull-right btn btn-success" ng-click="addWidget()"><i class="glyphicon glyphicon-plus"></i> 添加资源框</a>
			<h1 style="display: inline-block; width: 200px; color:#fff">面板</h1>
			<select class="form-control" style="width: 150px; margin-bottom: 20px; display:inline-block;" ng-model="selectedDashboardId" ng-options="d.id as d.name for d in dashboards | object2Array | orderBy:'id'">
			</select>
		</div>
	</div>
</div>

<div class="row">
	<div class="col-md-12">
		<div gridster="gridsterOptions">
			<ul>
				<li gridster-item="widget" ng-repeat="widget in dashboard.widgets">
					<div class="box" ng-controller="CustomWidgetCtrl">
						<div class="box-header">
							<h3>{{ widget.name }}</h3>
							<div class="box-header-btns pull-right">
								<a title="settings" ng-click="openSettings(widget)"><i class="glyphicon glyphicon-cog"></i></a>
								<a title="Remove widget" ng-click="remove(widget)"><i class="glyphicon glyphicon-trash"></i></a>
							</div>
						</div>
						<div dyn-custom class="box-content hin" content="{{widget.content}}" type="{{widget.type}}">
						</div>
					</div>
				</li>
			</ul>
		</div>
	</div>
</div>